  $(function(){
  	//show suggestion
  	$("#town").autocomplete({
  		source: function(request, response) {
  			var keyword = request.term;
  			$.getJSON(AJAX_URL + 'town.ajax.php?keyword='+keyword+'&limit='+MAX_SUGGESTION, function(towns){
  				response( $.map(towns, function(town) {
  					return {
  						label: town.name+' '+'('+town.code+')',
  						value: town.name+' '+'('+town.code+')'
  					}
  				}));
  			});
  		},
  		minLength: 1
  	});

  	//show advanced search
  	//$('#expand-advanced-search').bind('click', function(){
	//		$('#advanced-search').slideToggle();
  	//});
  });
